package com.itheima.flowSort;

import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

public class FlowReducerTask extends Reducer<FlowPojo,Text,Text, NullWritable> {

    @Override
    protected void reduce(FlowPojo key, Iterable<Text> values, Context context) throws IOException, InterruptedException {

        for(Text phone:values){
            String pahon = phone.toString();
            context.write(new Text(pahon+"\t"+key.toString()),NullWritable.get());
        }
    }
}
